/**
 * member & level
 */

import request from '@/utils/request'

// list
export function list(data) {
  return request({
    url: '/api/uni/user/user/list',
    method: 'post',
    data
  })
}

// edit
export function edit(data) {
  return request({
    url: '/api/uni/user/user/edit',
    method: 'post',
    data
  })
}

// view
export function view(data) {
  return request({
    url: '/api/uni/user/user/view',
    method: 'post',
    data
  })
}

// statusList
export function statusList(data) {
  return request({
    url: '/api/uni/user/user/status-list',
    method: 'post',
    data
  })
}

// changeStatus
export function changeStatus(data) {
  return request({
    url: '/api/uni/user/user/change-status',
    method: 'post',
    data
  })
}

// remove
export function remove(data) {
  return request({
    url: '/api/uni/user/user/remove',
    method: 'post',
    data
  })
}

// -----------------------------------------------------

// level list
export function levelList(data) {
  return request({
    url: '/api/uni/user/user/level-list',
    method: 'post',
    data
  })
}

// level edit
export function levelEdit(data) {
  return request({
    url: '/api/uni/user/user/level-edit',
    method: 'post',
    data
  })
}

// z setting
export function zList(data) {
  return request({
    url: '/api/uni/user/user/z-list',
    method: 'post',
    data
  })
}

// z edit
export function zEdit(data) {
  return request({
    url: '/api/uni/user/user/z-edit',
    method: 'post',
    data
  })
}

// -----------------------------------------------------

// user edit referrer list
export function userReferrerList(data) {
  return request({
    url: '/api/uni/user/user/user-referrer-list',
    method: 'post',
    data
  })
}

// -----------------------------------------------------

// team tree
export function getTeamTree(data) {
  return request({
    url: '/api/uni/user/user/team-tree',
    method: 'post',
    data
  })
}

// -----------------------------------------------------

// admin refill
export function adminRefill(data) {
  return request({
    url: '/api/uni/user/user/admin-refill',
    method: 'post',
    data
  })
}

// admin refill list
export function adminRefillList(data) {
  return request({
    url: '/api/uni/user/user/admin-refill-list',
    method: 'post',
    data
  })
}

// -----------------------------------------------------

// fetch
export function fetchSet(data) {
  return request({
    url: '/api/uni/system/user/fetch',
    method: 'post',
    data
  })
}

// save
export function saveSet(data) {
  return request({
    url: '/api/uni/system/user/save',
    method: 'post',
    data
  })
}

// -----------------------------------------------------

export function getTree(data) {
  return request({
    url: '/api/city/tree',
    method: 'post',
    data
  })
}

export function saveChecked(data) {
  return request({
    url: '/api/city/checked',
    method: 'post',
    data
  })
}

export function getChecked(data) {
  return request({
    url: '/api/city/get',
    method: 'post',
    data
  })
}

// -----------------------------------------------

export function getCommission(data) {
  return request({
    url: '/api/uni/user/user/commission',
    method: 'post',
    data
  })
}

export function getConsume(data) {
  return request({
    url: '/api/uni/user/user/consume',
    method: 'post',
    data
  })
}

export function resetPassword(data) {
  return request({
    url: '/api/uni/user/user/reset-pay-password',
    method: 'post',
    data
  })
}

// 代客下单
export function old(data) {
  return request({
    url: '/api/uni/bao/bao/old',
    method: 'post',
    data
  })
}

export function baoUser(data) {
  return request({
    url: '/api/uni/bao/bao/user',
    method: 'post',
    data
  })
}

export function baoSku(data) {
  return request({
    url: '/api/uni/bao/bao/sku',
    method: 'post',
    data
  })
}

export function baoProduct(data) {
  return request({
    url: '/api/uni/bao/bao/product',
    method: 'post',
    data
  })
}

export function baoSave(data) {
  return request({
    url: '/api/uni/bao/bao/save',
    method: 'post',
    data
  })
}

// 合并订单
export function merge(data) {
  return request({
    url: '/api/uni/bao/bao/merge',
    method: 'post',
    data
  })
}

export function mergeCancel(data) {
  return request({
    url: '/api/uni/bao/bao/merge-cancel',
    method: 'post',
    data
  })
}
